package cn.common.tool;

public class DealFontToBackArray 
{	
	/*后台处理前台传回来的数组，把一个字符串转成一个数组*/
	public static char[] DealArray(String str)
	{
		char str_return[]= new char[20];
		int j=0;
		char str_deal[] = str.toCharArray();
		
		
		for(int i=0;i<str_deal.length;i++)
		{
			if(str_deal[i]=='[' || str_deal[i]==']' || str_deal[i]=='\"' || str_deal[i]==',')
			{
				continue;
			}
			else
			{
				System.out.println(str_deal[i]);
				str_return[j]=str_deal[i];
				j++;
			}
		}
		
		return str_return;
	}
	
	
	public static int CharReallength(char str[])
	{
		int j=0;
		for(int i=0;i<str.length;i++)
		{
			if('9'>=str[i]&&str[i]>='0')
			{
				j++;
			}
		}
		
		return j;
	}
	
	public  static void main(String args[])
	{
		String str="[\"4\",\"5\",\"6\",\"8\"]";
		char str_return[] = DealArray(str);
		System.out.println(CharReallength(str_return));
	}
}
